package com.dashen.simple.listener;


import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @auther barry
 * @date 2019/2/22
 */
public class MyServletContextListener implements ServletContextListener {


    public void contextInitialized(ServletContextEvent servletContextEvent) {
        ServletContext context = servletContextEvent.getServletContext();
        context.setAttribute("barry", "barry's web");
    }

    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
